<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!--iPhone私有标签，它表示：允许全屏模式浏览-->
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<!--iPhone私有标签，它指定的iPhone中safari顶端的状态条的样式-->
		<meta name="format-detection" content="telephone=no; email=no" />
		<!--不识别邮件和不把数字识别为电话号码-->
		<link rel="stylesheet" type="text/css" href="assets/css/ydui.css" />
		<link rel="stylesheet" type="text/css" href='assets/css/paySuccess.css?fh500=' + new Date().getTime() />
		<link rel="stylesheet" type="text/css" href="assets/css/reset.css" />
		<script src="assets/js/ydui.flexible.js"></script>

		<title>芯球泊车</title>

	</head>

	<body>

		<section class="g-flexview">

			<!--<header class="m-navbar">
				<a  class="navbar-item"><i class="back-ico"></i></a>
				<div class="navbar-center"><span class="navbar-title">芯球泊车</span></div>
			</header>-->

			<section class="g-scrollview">

				<div class="success_biaozhi">

					<img src="assets/img/success.png" alt="" />
					<div class="success_text">支付成功</div>

				</div>
				<div class="quChelocation">
					请到<span class="location">--</span>取车
				</div>

				<div class="tipOne">
					泊车机器人将在10分钟内将车送至指定取车点，

				</div>

				<div class="tipTwo">

					请您在取到车后15分钟内驶离停车场，
				</div>

				<div class="tipThree">
					否则将产生额外费用。
				</div>

				<div class="tipFirth">

					<span class="redTip">提示：</span>
					<span class="boldTip">请牢记取车点取车</span>

				</div>

				<section class="boxDetails">
					<div class="payMoney">

						<span class="left">支付金额</span>
						<span class="right"></span>

					</div>

					<div class="details_box">
						<div class="list">
							<span class="left">商品</span>
							<span class="right"></span>
						</div>
						
						
						
						
						
						

						<div class="list">
							<span class="left">商户全称</span>
							<span class="right"></span>
						</div>
						<div class="list">
							<span class="left">交易时间</span>
							<span class="right"></span>
						</div>
						<div class="list">
							<span class="left">支付方式</span>
							<span class="right">微信支付</span>
						</div>
						<div class="list">
							<span class="left">交易单号</span>
							<span class="right"></span>
						</div>

					</div>

				</section>

				<!--<div class="button" style="margin-bottom: 0.30rem;">
					确认
				</div>
				-->

			</section>

		</section>

	</body>

	<script type="text/javascript" src="assets/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="assets/js/ydui.js"></script>
	<script type="text/javascript" src="assets/js/vconsole.js"></script>
	<script type="text/javascript" src="assets/js/api.js?fjl=" +new Date().getTime()></script>

	<script type="text/javascript">
		var outTradeNo = window.localStorage.getItem("outTradeNo");
		var businessNo = window.localStorage.getItem("businessNo");
		var goodsLei = window.localStorage.getItem("goodsLei");
		var dialog = window.YDUI.dialog;

		//刚进页面就执行的函数;
		$(function() {

			var data = {
				"outTradeNo": outTradeNo,
				"payType": "2",
				"businessNo": businessNo

			};
			ajaxJson('post', 'app/notifyDevice/callback/qucheWX', data, function(data) {

				if(data.code == 200 && data.ifsuccess) {
					qucheWX(data.result)
				} else {
					dialog.toast(data.msg, 'none', 1000);
				}

			}, function() {

			});

		})

		function qucheWX(data) {

			$(".location").text(data.pickUpSome)

			var result = ""

			result += '<div class="payMoney">'
			result += '<span class="left">支付金额</span>'
			result += '<span class="right">'+data.payPrice+'元</span>'
			result += '</div>'

			result += '<div class="details_box">'
			result += '<div class="list">'
			result += '<span class="left">商品</span>'
			result += '<span class="right">'+goodsLei+'</span>'
			result += '</div>'
			result += '<div class="list">'
			result += '<span class="left">商户全称</span>'
			result += '<span class="right">'+data.mechineName+'</span>'
			result += '</div>'
			result += '<div class="list">'
			result += '<span class="left">交易时间</span>'
			result += '<span class="right">'+timestampToTime(data.tradeTime)+'</span>'
			result += '</div>'
			result += '<div class="list">'
			result += '<span class="left">支付方式</span>'
			result += '<span class="right">微信支付</span>'
			result += '</div>'
			result += '<div class="list">'
			result += '<span class="left">交易单号</span>'
			result += '<span class="right">'+data.outTradeNo+'</span>'
			result += '</div>'
			result += '</div>'

			$(".boxDetails").html(result)

		}
	</script>
	
	
	<script type="text/javascript">
		//时间戳变成日期格式
		function timestampToTime(timestamp) {
			var date = new Date(timestamp); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
			Y = date.getFullYear() + '-';
			M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
			D = date.getDate() < 10 ? "0" + date.getDate() + ' ' : date.getDate() + ' ';
			h = date.getHours() < 10 ? +"0" + date.getHours() + ':' : date.getHours() + ':';
			m = date.getMinutes() < 10 ? "0" + date.getMinutes() + ':' : date.getMinutes() + ':';
			s = date.getSeconds() < 10 ? "0" + date.getSeconds() + ' ' : date.getSeconds();
			return Y + M + D + h + m + s;
		}
		
	</script>
	
	

</html>